/**
 * This file is part of S-PTAM.
 *
 * Copyright (C) 2015 Taihú Pire and Thomas Fischer
 * For more information see <https://github.com/lrse/sptam>
 *
 * S-PTAM is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * S-PTAM is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with S-PTAM. If not, see <http://www.gnu.org/licenses/>.
 *
 * Authors:  Taihú Pire <tpire at dc dot uba dot ar>
 *           Thomas Fischer <tfischer at dc dot uba dot ar>
 *
 * Laboratory of Robotics and Embedded Systems
 * Department of Computer Science
 * Faculty of Exact and Natural Sciences
 * University of Buenos Aires
 */

#include "ObjectPoint.hpp"
#include "utils/projective_math.hpp"

ObjectPoint::ObjectPoint(const Eigen::Vector3d& position)
  : position_( position )
{
  color_ = cv::Vec3b(32,165,218) ; //goldenrod
}

/* TODO: Gaston: When a points is added to the Map, has to be copyed, but the shared_mutex does not have a
 * a default copy constructor. Thats why we have to specify that the new points will have a separate mutex */
ObjectPoint::ObjectPoint(const ObjectPoint& objPoint)
: opoint_mutex_() // The copy has a diferent mutex!
, position_( objPoint.position_ )
{
  color_ = objPoint.getColor() ;
}
